13. Practice - Salted, Hashed Passwords

Practice - Using the BCrypt Python Package with Salts

Python has a useful package called BCrypt that implements the BCrypt hashing algorithm as well as random salt generation for us. We've given you some example code in a notebook below and enough information to answer the questions following the notebook. If you get stuck, refer to the package documentation .

Workspace

This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity , so you may be able to download them there.

Workspace Information:

  • Default file path:
  • Workspace type: jupyter
  • Opened files (when workspace is loaded): n/a

Checking Salted Hashed Passwords

Which password correctly matches the following salted digest?

hashed = b'$2b$14$EFOxm3q8UWH8ZzK1h.WTZeRcPyr8/X0vRfuL3/e9z7AKIMnocurBG'
SOLUTION: learningisfun